@model MVCCornucopia.Data.Employee
@{
    ViewBag.Title = "Details";
}

<script type="text/javascript">

    $(document).ready(function () {


        $("#cancelLink").click(function () {
            $("#editDialog").dialog('close');
        })
    });

</script>
<h2>
    Employee Details</h2>
<fieldset>
    <div class="display-label">
        Domain Username :
    </div>
    <div class="display-field">@Model.DomainUserName</div>

    <div class="display-label">
        Control # :</div>
    <div class="display-field">@Model.InternalControlNumber (readonly)</div>

    <div class="display-label">
        Occupation:</div>
    <div class="display-field">@Html.DisplayFor(model => model.EmployeeOccupationId, "EmployeeOccupation")</div>

    <div class="display-label">
        Salary Level :</div>
    <div class="display-field">@Html.DisplayFor(model => model.EmployeeSalaryLevelId, "SalaryLevel") (readonly)</div>

    <div class="display-label">
        Gender:</div>
    <div class="display-field">@Html.DisplayFor(model => model.GenderId, "Gender")</div>

    <div class="display-label">
        First Name:</div>
    <div class="display-field">@Model.FirstName</div>

    <div class="display-label">
        Last Name:</div>
    <div class="display-field">@Model.LastName</div>

    <div class="display-label">
        Date Of Birth:</div>
    <div class="display-field">@String.Format("{0:g}", Model.DateOfBirth)</div>

    <div class="display-label">
        Background Color:</div>
    @Html.DisplayFor(x => @Model.ThemeBackgroundColor, "Color")

    <div class="display-label">
        Email Address:</div>
    <div class="display-field">@Model.EmailAddress</div>

    <div class="display-label">
        Phone Number:</div>
    <div class="display-field">@Model.PhoneNumber</div>

    <div class="display-label">
        Facebook Url:</div>
    <div class="display-field">@Model.FacebookUrl (display?) @Model.DisplayFacebookUrlConsent</div>

</fieldset>

<div class="bottomDialog">

    @Ajax.ActionLink("Edit", "EditAjax", new { id = Model.EmployeeId }, new AjaxOptions
                   {
                       UpdateTargetId = "editDialog",
                       HttpMethod = "GET",
                       InsertionMode = InsertionMode.Replace,
                       OnComplete = "OpenEditDialog",
                       LoadingElementId = "resultLoadingDiv"

                   }, new { @class = "linkButton" })   
                   
                   <a href="#" id="cancelLink" class="linkButton">Cancel</a>
</div>

